package com.tinyseed.emcp.api.basicdata.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * tb_enterprise
 *
 * @author tinyCode
 * @date 2019-11-20 17:13:12
 */
@Data
@Table(name = "tb_enterprise")
@Entity()
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class Enterprise implements Serializable {

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO	, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.tinyseed.emcp.api.app.common.ManulInsertGenerator")
    private Long id;
    /**
     * 市
     */
    @Column(nullable = true)
    private String city;
    /**
     * 县区
     */
    @Column(nullable = true)
    private String area;
    /**
     * 省
     */
    @Column(nullable = true)
    private String province;
    /**
     * 行业类型
     */
    @Column(nullable = true)
    private String industryCode;

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "industryCode", referencedColumnName = "industryCode", insertable = false, updatable = false)
    private Industry industry;

    /**
     * 企业社会信用代码
     */
    @Column(nullable = true)
    private String socialCreditCode;
    /**
     * 行政区域
     */
    @Column(nullable = true)
    private String organizeName;
    /**
     * 企业负责人(法人)
     */
    @Column(nullable = true)
    private String legalPerson;
    /**
     * 企业负责人电话
     */
    @Column(nullable = true)
    private String legalPhone;
    /**
     * 安环负责人
     */
    @Column(nullable = true)
    private String checkPerson;
    /**
     * 安环负责人电话
     */
    @Column(nullable = true)
    private String checkPhone;
    /**
     * 电气负责人
     */
    @Column(nullable = true)
    private String chargePerson;
    /**
     * 电气负责人电话
     */
    @Column(nullable = true)
    private String chargePhone;
    /**
     * 删除标记
     */
    @Column(nullable = true)
    private String deleteFlag;
    /**
     * 企业名称
     */
    @Column(nullable = true)
    private String enterpriseName;
    /**
     * 经度
     */
    @Column(nullable = true)
    private Float longitude;
    /**
     * 经度
     */
    @Column(nullable = true)
    private Float latitude;
    /**
     * 备注
     */
    @Column(nullable = true)
    private String remark;
    /**
     * 行政区域id
     */
    @Column(nullable = true)
    private Long organizeId;
    /**
     * 创建时间
     */
    @Column(nullable = true)
    private Timestamp createTime;
    /**
     * 最后修改时间
     */
    @Column(nullable = true)
    private Timestamp modifyTime;
    /**
     * 创建人
     */
    @Column(nullable = true)
    private String creator;
    /**
     * 最后操作人
     */
    @Column(nullable = true)
    private String modifier;

    /**
     * 地址
     */
    @Column(nullable = true)
    private String address;
}
